package org.javaboy.sms_login.service;

import org.javaboy.sms_login.mapper.SendSmsLogMapper;
import org.javaboy.sms_login.model.SendSmsLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class SendSmsLogService {
    @Autowired
    SendSmsLogMapper sendSmsLogMapper;
    public void save(SendSmsLog sendSmsLog) {
        sendSmsLogMapper.save(sendSmsLog);
    }

    public void updateStatus(String msgId, int status) {
        sendSmsLogMapper.updateStatus(msgId, status);
    }

    public List<SendSmsLog> getSmsLog(int status, Date nowTime) {
        return sendSmsLogMapper.getSmsLog(status, nowTime);
    }

    public void updateCount(Integer msgId, int count) {
        sendSmsLogMapper.updateCount(msgId, count);
    }
}
